<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>展示</title>
<link rel="icon" href="${pageContext.request.contextPath}/img/favicon.ico" type="image/x-icon">
<link rel="stylesheet" href="${pageContext.request.contextPath}/css/bootstrap.min.css" type="text/css" />
<script src="${pageContext.request.contextPath}/js/jquery-1.11.3.min.js" type="text/javascript"></script>
<script src="${pageContext.request.contextPath}/js/jquery.qrcode.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery-ui.min.js"></script>
<script src="${pageContext.request.contextPath}/js/bootstrap.min.js" type="text/javascript"></script>
<link rel="stylesheet" href="${pageContext.request.contextPath}/css/jquery-ui.structure.min.css" />
<link rel="stylesheet" href="${pageContext.request.contextPath}/css/jquery-ui.min.css" />
<link rel="stylesheet" href="${pageContext.request.contextPath}/css/jquery-ui.theme.min.css" />


<style>
body {
	margin-top: 20px;
	margin: 0 auto;
	width: 100%;
}

.carousel-inner .item img {
	width: 100%;
	height: 300px;
}
</style>
</head>

<body>
	
	<!-- 引入header.jsp -->
	<jsp:include page="/header.jsp"></jsp:include>
	<div class="container">
    <div class="row" >	
		<c:forEach items="${pageBean.list }" var="ht">
		<div class="col-md-12">
			<div  class="col-md-12" style="height:450px;text-align: center;" >
				<a href="${pageContext.request.contextPath }/project/intoHometypeInfo.action?htid=${ht.ht_id}"> 
					<img src="${pageContext.request.contextPath }/${ht.ht_image}" width="90%" height="400" >
				</a>
				<p style="text-align:center">
					<a class="center-block" href="${pageContext.request.contextPath }/project/intoHometypeInfo.action?htid=${ht.ht_id}" style="color: green">${ht.ht_name }</a>
				</p>
				<p style="text-align:center">
					<font color="#FF0000">价格：&yen;${ht.ht_price}</font>
				</p>
			</div>
		</div>
		</c:forEach>
	</div>
	
	<!--分页 -->
	<div style="width: 380px; margin: 0 auto; margin-top: 50px;text-align: center;">
		<ul class="pagination" style="text-align: center; margin-top: 10px;">
		<!-- 上一页 -->
		<c:if test="${pageBean.currentPage==1 }">
			<li class="disabled">
				<a href="javascript:void(0);" aria-label="Previous">
					<span aria-hidden="true">&laquo;</span>
				</a>
			</li>
		</c:if>
		<c:if test="${pageBean.currentPage!=1 }">
			<li>
				<a href="${pageContext.request.contextPath}/project/getProjectCategory.action?pid=${pid}&currentPage=${pageBean.currentPage-1 }" aria-label="Previous">
					<span aria-hidden="true">&laquo;</span>
				</a>
			</li>
		</c:if>
		<!-- 显示每一页 -->
		<c:forEach begin="1" end="${pageBean.totalPage }" var="page">
			<!-- 判断是否是当前页 -->
			<c:if test="${page==pageBean.currentPage }">
				<li class="active"><a href="javascript:void(0);">${page }</a></li>
			</c:if>
			<c:if test="${page!=pageBean.currentPage }">
				<li><a href="${pageContext.request.contextPath}/project/getProjectCategory.action?pid=${pid}&currentPage=${page }">${page }</a></li>
			</c:if>
		</c:forEach>
		<!-- 下一页 -->
		<c:if test="${pageBean.currentPage==pageBean.totalPage }">
			<li class="disabled">
				<a href="javascript:void(0);" aria-label="Next"> 
					<span aria-hidden="true">&raquo;</span>
				</a>
			</li>
		</c:if>
		<c:if test="${pageBean.currentPage!=pageBean.totalPage }">
			<li>
				<a href="${pageContext.request.contextPath}/project/getProjectCategory.action?pid=${pid}&currentPage=${pageBean.currentPage+1 }" aria-label="Next"> 
					<span aria-hidden="true">&raquo;</span>
				</a>
			</li>
		</c:if>
		</ul>
		</div>
	</div>
	<!-- 分页结束 -->

	<!-- 引入footer.jsp -->
	<jsp:include page="footer.jsp"></jsp:include>

</body>

</html>